/**
 * 用户信息
 */
const state = {
  token: 'Basic Y2xpZW50OjEyMzQ1Ng==',
  access_token:'',
  userInfo: {
    userType: 'user'
  },
  choosenBuilding:'',
  basicURL:'https://www.waibizi.com/',//'http://59.110.236.140:10000',
}

const getters = {
  getAccessToken(state){
      return state.access_token;
  },
  getBasicURL(state){
      return state.basicURL;
  },
  getToken(state) {
    return state.token
  },
  getUserInfo(state) {
    return state.userInfo
  },
  getChoosenBuilding(state){
	  return state.choosenBuilding
  }
}

const mutations = {
  setToken(state, data) {
    state.token = data
  },
  setAccessToken(state, data){
      state.access_token = data
  },
  setUserInfo(state, data) {
    state.userInfo = data
  },
  choosenBuilding(state,data){
	  state.choosenBuilding = data
  }
}
const actions = {

}

export default {
  state,
  getters,
  mutations,
  actions
}
